﻿<local:DocumentBase x:Class="WPFExcelReport.ArticleTechnic"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024"
                    Loaded="Window_Loaded"
                    Background="White"
                    Title="ArticleConditions"
                    >
    <local:DocumentBase.Resources>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical">
            <WrapPanel  Name="zoneCommand" Height="34" Margin="0,0,0,6">
                <Label Content="系统"    Width="40" Margin="0,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="0,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18"/>
                <Label Content="语言"    Width="40" Margin="0,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox  IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1"  HorizontalAlignment="Left" Background="Pink" FontSize="18"/>
                <Label Content="用户名"                                    Width="60" Margin="10,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox Name="txtUserID"  Width="80" Margin="10,0,0,0" Text=""  HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8"  CharacterCasing="Upper" KeyboardNavigation.TabIndex="0"
                                     />
                <Label Content="密码"    Width="Auto" Margin="10,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0"   HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                <Button  Content="登录验证" Height="34" Margin="10,0,0,0"  Name="btnLogIn" Width="75" Click="btnLogIn_Click"  KeyboardNavigation.TabIndex="2"
                                     IsDefault="True"
                                     />
            </WrapPanel>
            <WrapPanel Name="ZoneFTP" IsEnabled="False"
                   Visibility="Hidden">
                <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
                <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
                <TextBlock>FTP站点:</TextBlock>
                <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.2.7</TextBox>
                <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
                <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="intex"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
                <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
                <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="Auto"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                    FTPLogIn
                </Button>
            </WrapPanel>
            <WrapPanel>
                <Button Content="查询品种" FontSize="18" Height="23" Margin="0,0,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
                <TextBlock FontSize="18"  Height="Auto"   Width="Auto"  Margin="10,0,0,0" Text="选择品种" />
                <TextBox FontSize="18"  Height="Auto"  Background="White"  Width="100" Name="txtArticle" Margin="10,0,0,0" Text="" />
                <TextBlock FontSize="18"  Height="Auto"   Width="Auto"  Margin="30,0,0,0" Text="品种" />
                <TextBlock FontSize="18"  Height="Auto"  Background="PaleTurquoise"  Width="150" Name="txtArticleNum" Margin="0,0,0,0" Text="" />
                <TextBlock FontSize="18"  Height="Auto"   Width="Auto"  Margin="30,0,0,0" Text="版本" />
                <TextBox  FontSize="18" Background="Green" Height="Auto"    Width="40" Name="txtArticleVar"   Margin="0,0,0,0"    Text="" />
                <TextBlock FontSize="18"  Height="Auto"   Width="Auto"  Margin="30,0,0,0" Text="色号" />
                <TextBlock  FontSize="18" Background="Yellow" Height="Auto"    Width="40" Name="txtColor"  Margin="0,0,0,0"  Text="" />
                <TextBlock FontSize="18"  Height="Auto"   Width="Auto"  Margin="30,0,0,0" Text="后整理" />
                <TextBlock  FontSize="18"  Background="Pink" Height="Auto"    Width="115" Name="txtFinish"  Margin="0,0,0,0" Text="" />
            </WrapPanel>
            <WrapPanel Margin="0,10,0,10">
                <Button Content="生成报表" FontSize="18" Height="23" Margin="0,0,0,0"  Name="btnPrint" Width="90" Click="btnPrint_Click"/>
                <ComboBox Name="cmbFormat" Margin="20,0,0,0" 
                          Background="White"
                          FontSize="18"
                          Width="100" IsEditable="True" SelectedIndex="0">
                    <ComboBoxItem>产品工艺</ComboBoxItem>
                    <ComboBoxItem>中样试制</ComboBoxItem>
                </ComboBox>
            </WrapPanel>
        </StackPanel>
        <fd:FilteringDataGrid  Grid.Row="1" Grid.Column="0"
                               CanUserReorderColumns="True"    
                               FontSize="18"
                               VerticalScrollBarVisibility="Visible"
                               CanUserResizeRows="True" CanUserSortColumns="True"
                               IsFilteringCaseSensitive="False"
                               EnableRowVirtualization="True"  
                               RowDetailsVisibilityMode="VisibleWhenSelected"  
                               AutoGenerateColumns="False"   
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible" 
                               Margin="0,0,0,0"  
                               ItemsSource="{Binding Path=ARTICLE}" 
                               x:Name="wAFARBENDataGrid" 
                               SelectionChanged="wAFARBENDataGrid_SelectionChanged" 
                             >
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                <DataGridTextColumn Header="描述" Binding="{Binding ARTDES, Converter={StaticResource ResourceKey=gb2312}}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <Grid Grid.Row="1" Grid.Column="1">
            <StackPanel>
                <fd:FilteringDataGrid
                  FontSize="18"
                  MaxHeight="300"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ARTICLECOLOR}" 
                               Margin="0,0,0,0" 
                               x:Name="listColor" 
                  VerticalScrollBarVisibility="Visible"
                                  SelectionChanged="listColor_SelectionChanged"
                             >
                    <fd:FilteringDataGrid.Columns>
                        <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                        <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                        <DataGridTextColumn Header="色号" Binding="{Binding ARTCOLOR}"/>
                        <DataGridTextColumn Header="描述" Binding="{Binding COLORDES, Converter={StaticResource ResourceKey=gb2312}}"/>
                    </fd:FilteringDataGrid.Columns>
                </fd:FilteringDataGrid  >
                <fd:FilteringDataGrid  
                CanUserReorderColumns="True"  
                MaxHeight="300"
                VerticalScrollBarVisibility="Visible"
                CanUserResizeRows="True" CanUserSortColumns="True"
                IsFilteringCaseSensitive="False"
                AutoGenerateColumns="False"   
                EnableRowVirtualization="True"  
                FontSize="18"
                RowDetailsVisibilityMode="VisibleWhenSelected"  
                Height="Auto" HorizontalAlignment="Stretch"
                Width="Auto" VerticalAlignment="Stretch"
                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                ItemsSource="{Binding Path=ARTICLEFINISH}" 
                Margin="0,0,0,0" 
                x:Name="listFinish" 
                SelectionChanged="listFinish_SelectionChanged"
                >
                    <fd:FilteringDataGrid.Columns>
                        <DataGridTextColumn Header="后整理" Binding="{Binding ARTFIN, Converter={StaticResource ResourceKey=gb2312}}"/>
                        <DataGridTextColumn Header="描述" Binding="{Binding FINISHDES, Converter={StaticResource ResourceKey=gb2312}}"/>
                    </fd:FilteringDataGrid.Columns>
                </fd:FilteringDataGrid  >
                <ListView   ItemsSource="{Binding Path=ARTICLECOLOR}" >
                    <ListView.View>
                        <GridView AllowsColumnReorder="true"
                                  ColumnHeaderToolTip="品种">
                            <GridViewColumn DisplayMemberBinding= "{Binding Path=ARTNUM}"   Header="品种" Width="100"/>
                            <GridViewColumn DisplayMemberBinding= "{Binding Path=ARTVAR}"  Header="版本" Width="100"/>
                            <GridViewColumn DisplayMemberBinding= "{Binding Path=ARTCOLOR}"  Header="色号" Width="100"/>
                            <GridViewColumn DisplayMemberBinding= "{Binding COLORDES, Converter={StaticResource ResourceKey=gb2312}}"  Header="描述" Width="100"/>
                        </GridView>
                    </ListView.View>
                </ListView>
            </StackPanel>
        </Grid>
        <TextBox  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
            Height="40" Margin="0,0,0,0" Name="textBox1" Width="Auto" HorizontalAlignment="Stretch" />
    </Grid>
</local:DocumentBase>
